package com.csnf.controller;


import com.csnf.feign.WeatherFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/weather")
public class WeatherController {


    @Autowired
    WeatherFeignClient weatherFeignClient;

    @RequestMapping("/getWeather")
    public String getWeather(String cityId){

        String auth = "APPCODE 93b7e19861a24c519a7548b17dc16d75";
        String token = "50b53ff8dd7d9fa320d3d3ca32cf8ed1";

        String weather = weatherFeignClient.getWeather(auth,token,cityId);

        return weather;

    }

}
